from machine import Pin, I2C
from MPU6050 import MPU6050
import time

clk = Pin(("clk", 22), Pin.OUT_OD)
sda = Pin(("sda", 23), Pin.OUT_OD)
i2c = I2C(-1, clk, sda, freq=100000)

mpu = MPU6050(i2c)

while True:
    accel = mpu.read_accelerometer()
    gyro = mpu.read_gyroscope()
    temp = mpu.read_temperature()
    print('accel_x: %d\taccel_y: %d\taccel_z: %d' % (accel[0], accel[1], accel[2]))
    print('gyro_x: %d\tgyro_y: %d\tgyro_z: %d' % (gyro[0], gyro[1], gyro[2]))
    print('temp: %.2fC' % temp)
    time.sleep(1)